package cn.jinshengda.controller;


import cn.jinshengda.entity.Degree;
import cn.jinshengda.service.DegreeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2022-01-08
 */
@RestController
@CrossOrigin
public class DegreeController {
    @Autowired
    private DegreeService degreeService;

    @GetMapping("degree/{id}")
    public Degree queryById(@PathVariable Integer id){
        Degree degree = degreeService.getById(id);
        return degree;
    }
}

